package com.yinhai.controller;

import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author : chengxd
 * @create 2024/2/6 17:01
 */
@RestController
public class HelloController {

    @GetMapping("/hello")
    //@PreAuthorize("hasAuthority('test')")
    //@PreAuthorize("hasAuthority('system::dept:list')")
    //@PreAuthorize("hasAuthority('system::dept:list')")
    @PreAuthorize("@ex.hasAuthority('test')")
    public String hello(){
        return "hello";
    }
}
